# $Id$
# Maintainer:
# Contributor: Stanislaw Datskevich <me a nek0 net>
# Contributor: Gregor Robinson <gregor@fiatflux.co.uk>
# Contributor: Martin Perner <martin dot perner at gmail dot com>

pkgname=pkcs11-helper
pkgver=1.22
pkgrel=2
pkgdesc="A library that simplifies the interaction with PKCS11 providers for end-user applications using a simple API and optional OpenSSL engine"
arch=('i686' 'x86_64')
url='https://github.com/OpenSC/pkcs11-helper'
license=(GPL BSD)
depends=('gnutls' 'nss' 'openssl')
source=("https://github.com/OpenSC/pkcs11-helper/archive/pkcs11-helper-$pkgver.tar.gz")
sha512sums=('86fdbdbcbce9d5e79f6380f7c79866bc5df3e659c610f8aac4f355f858a9921abb4df125bb724e9d7c40b691795ccaba6e1cf8f0d941eccf905ea4bef85aeeb7')

build() {
  cd pkcs11-helper-pkcs11-helper-$pkgver
  libtoolize
  aclocal
  autoheader
  automake --add-missing
  autoreconf -v
  ./configure --prefix=/usr
  make
}

package() {
  cd pkcs11-helper-pkcs11-helper-$pkgver
  make DESTDIR="$pkgdir" install
  mkdir -p "$pkgdir"/usr/share/licenses/$pkgname/
  install -Dm644 COPYING* "$pkgdir"/usr/share/licenses/$pkgname/
}

